The following code demonstrates the use of PEGetNGroupSortFields and PESetNthGroupSortField:
LOCAL nError, nGrpSortFields
LOCAL cGrpSortField, nDirection, result
nGrpSortFields = PEGetNGroupSortFields(Job)
IF nGrpSortFields < 0
nError = PEGetErrorCode(Job)
&& Handle error
return
ENDIF
cGrpSortField = "Count ({customer.CUSTOMER->CITY},;
{customer.CUSTOMER->CITY})"
nDirection = PE_SF_DESCENDING
result = PESetNthGroupSortField (Job, nGrpSortFields,;
cGrpSortField, nDirection)
IF result = .F.
nError = PEGetErrorCode(Job)
&& Handle error
return
ENDIF
Seagate Software IMG Holdings, Inc. http://www.seagatesoftware.com Support services: http://support.seagatesoftware.com |